package org.example.fronted.mapper;

import com.alipay.api.domain.Car;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.entity.Cart;

import java.sql.SQLException;

@Mapper
public interface CartMapper1 extends BaseMapper<Cart> {

    //清空用户购物车数据
    void deleteById(Integer id) throws SQLException;

    Integer getGoodByUIdAndGoodId(@Param("uId") String uId, @Param("goodId") Integer goodId);

    int addGood(@Param("good_id") String good_id, @Param("u_id") Integer u_id);

    int deleteAllGoods(@Param("goods_id") String  goods_id, @Param("u_id") Integer u_id);

    int subGood(@Param("good_id") Integer good_id, @Param("u_id") Integer u_id);

}
